@echo off
rem Specimen batch file to execute Coco/R for C#
rem Usage:  cococ  Grammar [-options etc]
rem         (usually from a directory containing the grammar in a file Grammar.ATG)
rem Note that the extension is not specified - it is added by the batch commands

if "%RESOURCE%" == "" goto error

rem Set and modify the environment variable RESOURCE to suit your installation

if "%1" == "" goto missing

rem It is assumed that a valid executable (coco.exe) is in the
rem     %RESOURCE%\cococ directory
rem and that the Parser.frame and Scanner.frame standard frame files are in the
rem     %RESOURCE%\cococ\frames directory
rem Modify this batch file appropriately if this is not the case

%RESOURCE%\cococ\coco %1.atg -frames %RESOURCE%\cococ\frames %2 %3 %4 %5 %6 %7

goto stop

:missing
echo No grammar file specified - use cococ Grammar [-options etc]
goto stop

:error
echo.
echo You have not set the RESOURCE environment variable
echo which must point to the Resource Kit hierarchy.
echo.
echo Typically you would do this with a command like
echo.
echo    set RESOURCE=c:\resource
echo.
echo (note that there are no spaces surrounding the = sign)
echo.
echo Alternatively, incorporate a setting for this path
echo into your default set up for environment variables.
echo.

:stop
